package com.swak.persistence.mybatis.methods.impls;

import com.swak.persistence.mybatis.methods.Sqls;

/**
 * 清除
 * 
 * @author lifeng
 * @date 2021年1月25日 下午5:13:45
 */
@Deprecated
public class ClearSelective extends QueryByCondition {

	@Override
	protected void doInject() {
		String sql = new StringBuilder().append(SCRIPT_START).append(UPDATE).append(SPACE).append(this.table.getName())
				.append(SPACE).append(this.convertSet(ClearSelective.includeClearSelectiveColumns())).append(SPACE)
				.append(this.parseWhereLogicDelEqualColumn(false)).append(ClearSelective.includeConditionClause())
				.append(SCRIPT_END).toString();

		this.addUpdateMappedStatement(Sqls.CLEAR_SELECTIVE.getMethod(), sql);
	}

	protected String convertSet(String sql) {
		return SET_START + sql + SET_END;
	}
}